Image processing device, image processing method, and recording device

ABSTRACT

An image processing device includes a code detection unit configured to detect a code image included in the input image, a pixel value determination unit configured to determine whether a pixel value of each pixel included in the code image corresponds to an intermediate color between a color of code elements constituting the code image and a color of a space between the code elements, and a pixel value converting unit configured to convert a pixel value of a separated pixel that is separated from the code elements by k pixels or more, among intermediate color pixels that are pixels determined to correspond to the intermediate color, into a pixel value brighter than the intermediate color, wherein k is an integer of 2 or greater.

The present application is based on, and claims priority from JPApplication Serial Number 2019-208555, filed Nov. 19, 2019, thedisclosure of which is hereby incorporated by reference herein in itsentirety.

BACKGROUND 1. Technical Field

The present disclosure relates to an image processing device, an imageprocessing method, and a recording device.

2. Related Art

It is disclosed that an image processing device performs, when theinformation of the barcode image is included in the image data forforming an image by an image forming unit, and when either of theresolution of the image forming unit and the resolution of the imagedata is not integer multiple of the other, regarding the resolution ofthe image data at the location of a barcode image as a resolution thatone is an integer multiple of the other, and outputting to the imageforming unit (See JP-A-2016-64511).

When a draft on which a code image such as a barcode and atwo-dimensional code (QR code (registered trademark) and the like) isrecoded is read by a reading apparatus such as a scanner, in thegenerated image data, a blur may occur in the edge portion of eachelement such as a bar constituting the code image. The blur is expressedin a color that is brighter than a color of the element and darker thana color of space between elements. The color of such a blur is called anintermediate color or halftone.

When halftone processing is executed to make image data including thecode image in which the blur occurs in the edge portion of the elementsuch as a bar recorded on a recording medium, the quality of the codeimage sometimes deteriorates due to unnecessary generation of dotscorresponding to pixels that match the blur.

SUMMARY

An image processing device includes a code detection unit configured todetect a code image included in the input image, a pixel valuedetermination unit configured to determine whether a pixel value of eachpixel included in the code image corresponds to an intermediate colorbetween a color of code elements constituting the code image and a colorof a space between the code elements, and a pixel value converting unitconfigured to convert a pixel value of a separated pixel that isseparated from the code elements by k pixels or more, among intermediatecolor pixels that are pixels determined to correspond to theintermediate color, into a pixel value brighter than the intermediatecolor, wherein k is an integer of 2 or greater.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram schematically illustrating a configuration ofan image processing device.

FIG. 2 is a flowchart illustrating image processing.

FIG. 3 is a diagram for explaining the flow of the image processingaccording to a specific example.

FIG. 4 is a diagram illustrating a comparative example of the presentembodiment.

FIG. 5 is a flowchart illustrating image processing of a modifiedexample.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

Hereinafter, the embodiments of the present disclosure will be describedbelow with reference to the drawings. Note that, each drawing is merelyillustrative for explaining the present embodiment. Because the drawingsare exemplary, the proportions or shapes may not be precise, or matchwith each other, or part of them may be omitted.

1. Device Configuration

FIG. 1 schematically illustrates a configuration of an image processingdevice 10 according to the present embodiment.

The image processing device 10 executes an image processing method. Theimage processing device 10 includes a control unit 11, a display unit13, an operation accepting unit 14, a communication interface 15, andthe like. The interface is abbreviated as IF. The control unit 11 isconfigured to include one or a plurality of ICs including a CPU 11 a asprocessor, a ROM 11 b, a RAM 11 c, other nonvolatile memory, and thelike.

In the control unit 11, the CPU 11 a serving as a processor executescalculation processing according to a program stored in the ROM 11 b orother memories, and the like, using the RAM 11 c or the like as a workarea, thereby controls the image processing device 10. The control unit11 functions as a pixel number converting unit 12 a, a code detectionunit 12 b, a pixel value determination unit 12 c, a pixel valueconverting unit 12 d, a color converting unit 12 e, a HT processing unit12 f, and the like, by following an image processing program 12. HT isthe abbreviation for half tone. Note that the processor is not limitedto one single CPU, it may have a configuration in which processing isperformed by a hardware circuit such as a plurality of CPUs, or an ASIC,or the like, or a configuration in which the CPU and the hardwarecircuit cooperate to perform the processing.

The display unit 13 is a unit configured to display visual information,and is composed of, for example, a liquid crystal display, an organicelectroluminescent display, or the like. The display unit 13 may beconfigured to include a display and a drive circuit that drives thedisplay. The operation accepting unit 14 is a unit configured to receiveoperations by a user, and is realized by, for example, a physicalbutton, a touch panel, a mouse, a keyboard, or the like. Of course, thetouch panel may be realized as one of the functions of the display unit13.

The display unit 13 and the operation accepting unit 14 may be part ofthe configuration of the image processing device 10, but they may be aperipheral device externally attached to the image processing device 10.The communication IF 15 is a generic term for one or a plurality of theIFs for the image processing device 10 to execute wired or wirelesscommunication with external devices according to a prescribedcommunication protocol including a known communication standard.

The recording unit 16 is, for example, a device to which the imageprocessing device 10 connects via the communication IF 15. In otherwords, the recording unit 16 is a recording device controlled by theimage processing device 10. The recording device is also called as aprinter, a printing device, or the like. The recording unit 16 performsrecording on a medium based on the recording data transmitted from theimage processing device 10. The recording unit 16 is able to executerecording by discharging inks of a plurality of colors such as cyan (C),magenta (M), yellow (Y), and black (K) by an ink-jet method. Accordingto the ink-jet method, the recording unit 16 performs the recording tothe medium based on the recording data in which a dot on or a dot off isdefined for each pixel, and ejecting the ink dots from nozzle which isnot illustrated. The medium is typically paper, but may be a medium ofmaterial other than paper.

The image processing device 10 is realized by, for example, a personalcomputer, a smartphone, a tablet terminal, a mobile phone, or aninformation processing device having the same processing capacity asthose. In addition, the image processing device 10 may be realized notonly by an independent single information processing device, but also bya plurality of information processing devices communicatively connectedto each other via a network.

The configuration including image processing device 10 and recordingunit 16 can be regarded as a system 1.

Alternatively, the image processing device 10 and the recording unit 16may be one integrated device 1. That is, a recording device 1 may beconfigured to include the image processing device 10 and the recordingunit 16. The recording device 1 including the image processing device 10and the recording unit 16 may be a multifunction peripheral having aplurality of functions such as a copy function and a facsimile function.

2. Image Processing Method

FIG. 2 illustrates image processing according to the present embodimentin which the control unit 11 executes according to the image processingprogram 12 by flowchart.

In step S100, the control unit 11 acquires image data to be processed.The control unit 11 acquires image data from the storage source of theimage data, for example, in response to an instruction to select theimage data by the user via the operation accepting unit 14. The storagesource of the image data varies, for example, a memory or a hard diskdrive in the image processing device 10, or an external memory or serverand the like. The image data acquired in step S100 is input image. Theinput image is assumed to be the image data generated by reading somedrafts using the scanner.

The image data is RGB data in a bitmap format, for example, each pixelhas a gradation value of each RGB (red, green, blue). The gradationvalue is represented by 256 gradations from 0 to 255, for example. Ofcourse, the control unit 11 can acquire RGB data to be processed byappropriately converting the format of the image data.

In step S110, the pixel number converting unit 12 a executes pixelnumber conversion processing of the image data as necessary. The pixelnumber conversion is a processing in which both vertical resolution andhorizontal resolution of the image data are combined with both verticalrecording resolution and horizontal recording resolution recorded by therecording unit 16. It is assumed that the recording resolution is knownat the time of step S110 due to the product specification of therecording unit 16 and the configuration related to the recordingpreviously input by user via the operation accepting unit 14. Forexample, if both the vertical resolution and the horizontal resolutionof the image data are 300 dpi, and both the vertical recordingresolution and the horizontal recording resolution are 600 dpi, eachnumber of pixels in the vertical and horizontal directions of the imagedata is doubled. Dpi means the number of pixels per inch. Depending onthe relationship between the image data and the recording resolution,the magnification for the pixel number conversion may be 1.0 and thepixel number conversion may not be substantially performed.

In step S120, the code detection unit 12 b detects a regioncorresponding to the code image from the image data. In the presentembodiment, a “code” or a “code image” is one of pattern images in whichinformation is encoded, and is a barcode, a QR code (registeredtrademark), or other two-dimensional code. As a method of detecting thecode image, various methods including known methods can be used. Forexample, the code detection unit 12 b can detect a region in the imagedata in which the black bar is arranged for not less than apredetermined number in a direction crossing the length direction of thebar, as a barcode. Step S120 corresponds to a detection step ofdetecting a code image.

In step S130, the pixel value determination unit 12 c selects a pixelincluded in a region corresponding to the code image detected in stepS120, which is one pixel which has not been selected as a pixel ofinterest until now as the pixel of interest. Note that, although notspecifically illustrated in FIG. 2, when the code image cannot bedetected from the image data in step S120, the control unit 11 proceedsto step S180 without executing step S130 to S170. Hereinafter,description will be continued on the assumption that the code image issuccessfully detected from the image data.

In step S140, the pixel value determination unit 12 c determines whetherthe pixel of interest corresponds to an intermediate color pixel. Then,if the pixel of interest corresponds to the intermediate color pixel,the processing proceeds from the determination of “Yes” to step S150, ifthe pixel of interest does not correspond to the intermediate colorpixel, the processing proceeds from the determination of “No” to stepS170.

An “intermediate color pixel” means a pixel corresponding to anintermediate color between a color of the code elements constituting thecode image and a color of a space between the code elements. An“intermediate color” means a color brighter than the color of the codeelement and darker than the color of the space. A “code element” forexample, refers to each bar constituting a barcode, if the code image isa barcode. The color of the code elements, in many cases, is black or adark color similar to black. On the other hand, the color of the spaceis often white or a light color similar to white. For convenience, apixel whose pixel value is the color of the code element is called a“code element pixel”, a pixel whose pixel value is the color of thespace is called a “space pixel”.

The pixel value determination unit 12 c may compare the pixel value ofthe pixel of interest with a predetermined threshold, which is set fordefining the intermediate color, to determine whether the pixel ofinterest corresponds to the intermediate color pixel. For example, asthresholds, a first threshold indicating the lower limit of thebrightness of the intermediate color and a second threshold indicatingthe upper limit of the brightness of the intermediate color are set. Thepixel value determination unit 12 c converts the pixel value of thepixel of interest into the brightness. Then, if the brightness of thepixel of interest is not less than the first threshold and not greaterthan the second threshold, it is determined that the pixel of interestcorresponds to the intermediate color pixel. Additionally, if thebrightness of the pixel of interest is less than the first threshold,the pixel value determination unit 12 c determines that the pixel ofinterest corresponds to the code element pixel, and, if the brightnessof the pixel of interest exceeds the second threshold, the pixel valuedetermination unit 12 c determines that the pixel of interestcorresponds to the space pixel. Such step S140 corresponds to adetermination step of determining whether the pixel value of the pixelincluded in the code image corresponds to the intermediate color.

In step S150, the pixel value converting unit 12 d determines whetherthe pixel of interest corresponds to a “separated pixel”, which is apixel separated from the code elements by k pixels or more. The pixel ofinterest which is a target of the determination of step S150 is, ofcourse, the intermediate color pixel. If the pixel of interestcorresponds to the separated pixel, the pixel value converting unit 12 dproceeds from the determination of “Yes” to step S150, if the pixel ofinterest does not correspond to the separated pixel, the pixel valueconverting unit 12 d proceeds from the determination of “No” to stepS170.

A pixel which is k pixels away from the code elements means the k-thpixel counted in a direction away from the code element pixel when apixel adjacent to the code element pixel that is not the code elementpixel is the first pixel. Note that, k is an integer of 2 or greater.

Here as an example, k=2. When k=2, the separated pixel may be defined asa pixel that is not adjacent to the code element. Additionally, whenk=2, a pixel adjacent to the code element may be defined as an “adjacentpixel”. The adjacent pixel is the pixel that is outside the code elementand does not correspond to the separated pixel.

In step S160, the pixel value converting unit 12 d converts the pixelvalue of pixel of interest into a color brighter than the intermediatecolor. A color brighter than the intermediate color is a color brighterthan the second threshold, but here is the color of the space. Since thecolor of the space is basically white, thus in step S160, the pixelvalue converting unit 12 d may convert the RGB value that is the pixelvalue of the pixel of interest into R=G=B=255. However, when the colorof the space is not white, the pixel value converting unit 12 d mayconvert the RGB value of the pixel of interest into a color of a spacewhich is not that white. Step S160 corresponds to a pixel valueconverting step of converting the separated pixel, among theintermediate color pixels, into a pixel value brighter than theintermediate color. After step S160, the processing proceeds to stepS170.

In step S170, the pixel value determination unit 12 c determines whetherall of the pixels included in the region corresponding to the code imagedetected in step S120 complete selection as the pixel of interest. Then,when an unselected pixel remains as the pixel of interest, theprocessing returns from the determination of “No” to step S130. On theother hand, when no unselected pixel remains as the pixel of interest,the processing proceeds from the determination of “Yes” to step S180.

In step S180, the color converting unit 12 e executes the colorconversion processing on the image data. When the image data includesthe code image, the color conversion processing is, of course, executedon the image data that has undergone the processes in step S130 to stepS170. The color conversion processing is a process to convert a colorsystem of the image data into a color system of the ink which is usedfor recording in the recording unit 16, and is executed on each pixel.The color system of the image data is, for example, RGB as describedabove, and the color system of the ink is, for example, CMYK asdescribed above. The color conversion processing is performed withreference to a color converting look-up table which is predetermined forthe converting relationships of these color systems. As a result of thecolor conversion processing, the image data becomes CMYK data in abitmap format including gradation values for each pixel.

Note that the timing for executing step S160 may be after step S180. Inother words, the pixel value which is the target of the pixel valueconversion in step S160 may be a CMYK value rather than an RGB value. Inthis case, the pixel value converting unit 12 d may convert the CMYKvalue of a pixel included in the code image corresponding to theintermediate color pixel and the separated pixel into, for example,C=m=Y=K=0, with respect to the image data after the color conversionprocessing is proceeded.

In step S190, the HT processing unit 12 f performs HT processing on theimage data after the color conversion. The HT processing, briefly, is aprocess in which the gradation value for each pixel of the image dataand each ink color CMYK are binarized into the information indicatingink discharge (dot on) or non-discharge (dot off). The HT processing isperformed by, for example, a dither method or an error diffusion method.

In step S200, the control unit 11 outputs the image data after the HTprocessing to the recording unit 16 as recording data. In the outputprocessing of step 200, the image data after the HT processing is outputto the recording unit 16 after being appropriately rearranged accordingto the timing and order used by the recording unit 16. Such outputprocessing is also referred to as a rasterization processing. As aresult, the recording unit 16 executes a recording processing based onthe recording data output from the image processing device 10.

FIG. 3 is a diagram for explaining the flow of the pixel processing ofthe present embodiment using specific examples. In FIG. 3, sign 20denotes a portion of a code image 20 that is a barcode in the imagedata. Each rectangle in the code image 20 and the like is each pixel. InFIG. 3, a black pixel is a code element pixel, each of the code elements20 a and 20 b as each bar constituting the code image 20 is representedby a collection of the code element pixels. In FIG. 3, white pixels arespace pixels, and a collection of space pixels represents the spacebetween the bars. Also, in FIG. 3, the intermediate color pixelrepresented in gray correspond to the “blur” described above that occursat the edge portion of the bar. In the image data acquired in step S100,such a blur sometimes occurs, sometimes does not occur in some part ofthe edge portion of the bar.

In step S110, the pixel number converting unit 12 a executes pixelnumber converting on the image data including the code image 20. In theexample illustrated in FIG. 3, the pixel numbers of the image data inboth longitudinal direction and lateral direction are increased by 2times by the pixel number conversion. In this case, the number of thecode element pixel, the number of the space pixel, and the number of theintermediate color pixel are increased by 2 times in both longitudinaldirection and lateral direction. The process of increasing the number ofpixels is an interpolation of the pixels. In FIG. 3, the code image 20after performing the pixel number converting in step S110 is a codeimage 21 using sign 21.

Processing of steps S120 to S180 is performed on the code image 21. InFIG. 3, the code image 21 after performing the processes in steps S120to S180 is referred to as a code image 22 using the sign 22. In FIG. 3,the pixel columns 21 a, 21 b, and 21 c are examples of pixel columnsthat are not adjacent to the code element 20 a and the code element 20b. In other words, the pixel columns 21 a, 21 b, 21 c are constituted byseparated pixels. During the process of step S120 to S180, particularlyby executing step S120 to S170, intermediate color pixels of the pixelsincluded in such pixel columns 21 a, 21 b, 21 c are target to pixelvalue conversion in step S160.

In FIG. 3, a pixel 24 corresponding to the separated pixel among theintermediate color pixels in the code image 21 is denoted by sign 24.Such pixels 24 are labeled as separated pixel 24. Additionally, in FIG.3, a pixel 25 corresponding to the code element 20 a among theintermediate color pixel in the code image 21 or an adjacent pixeladjacent to the code element 20 b is denoted by sign 25. Such pixels 25are labeled as adjacent pixel 25. As can be seen from FIG. 3, in theprocessing of converting the code image 21 into the code image 22, amongthe separated pixel 24 and the adjacent pixel 25, the pixel value of theseparated pixel 24 are converted into the color of the space such aswhite by step S160.

The HT processing in step S190 is performed on the code image 22. InFIG. 3, the code image 22 after the HT processing unit 12 f has executedthe HT processing is referred to as code image 23 using the sign 23. Theblack circles illustrated in the pixels of the code image 23 are dotsdefined for each pixel by the HT processing. In accordance with HTprocess, dot on is basically defined for the code element pixels, anddot off is defined for the space pixels. Also, according to HTprocessing, for the intermediate color pixel, dot on or dot off isdefined depending on the pixel value. Therefore, as illustrated in FIG.3, dot on and dot off are defined for the adjacent pixel 25, but dot offis defined for the separated pixel 24.

FIG. 4 is a diagram for explaining a comparative example to FIG. 3. Theinterpretation of FIG. 4 and the meaning of each sign in FIG. 4 are asexplained in FIG. 3. However, in FIG. 4, the code image 21 targeted topixel number converting in step S110 is only executed to the colorconversion processing (S180) and the HT processing (step S190), andconverted into the code image 26, and steps S120 to S170 related to thepresent embodiment are not executed. Therefore, in the comparativeexample of FIG. 4, as a result of the HT processing, even for theseparated pixel 24, the possibility of dots occurrence is high. Sincethe dot is generated with respect to the separation pixel 24, the edgesloshing of the code elements 20 a and 20 b, and the thickening of codeelements 20 a and 20 b, are being remarkable, the quality of the codeimage is degraded.

3. Conclusion

According to the present embodiment as described above, the imageprocessing device 10 includes the code detection unit 12 b configured todetect code image included in the input image, the pixel valuedetermination unit 12 c configured to determine whether the pixel valueof each pixel included in the code image corresponds to the intermediatecolor between the color of the code elements constituting the code imageand the color of the space between the code elements, and the pixelvalue converting unit 12 d configured to convert the pixel value of theseparated pixel that is a pixel separated from the code element by kpixels or more, among the intermediate color pixel that is determined tocorrespond to the intermediate color, into a pixel value brighter thanthe intermediate color. Wherein, k is an integer of 2 or greater.

According to the above-described configuration, the image processingdevice 10 converts the pixel value of the pixel corresponding theintermediate color pixel and the separated pixel, among the pixelsincluded in the code image, into the pixel value brighter than theintermediate color. Accordingly, the occurrence of the dot at a positionwhere the quality of the code image is reduced due to the blur includedin the image data can be suppressed. In concrete terms, it can be seenby comparing FIG. 3 with FIG. 4, the dots generated corresponding to theseparated pixels 24 in the code image 26 in FIG. 4, according to thepresent embodiment, do not occur as the separated pixels 24 in the codeimage 23 of FIG. 3. As a result, the edge sloshing of the code elements20 a and 20 b and the thickening of the code elements 20 a and 20 b isreduced, the code image is recorded with a good quality.

According to the description of FIG. 3, it can be said that the presentembodiment performs step S160 is particularly effective when theintermediate color pixel corresponding to the blur is increased in thecode image due to the pixel number conversion of the input image.However, regardless of the execution or inexecution of the pixel numberconversion on the input image, the present embodiment contributes toimproving the quality of the code image by executing step S160 for thepixel corresponding to the separated pixel that is the intermediatecolor pixel corresponding to the blur in the code image.

In addition, according to the present embodiment, the image processingmethod including steps executed by the image processing device 10, andthe image processing program 12 causing the computer to execute theimage processing method can be understood as the present disclosure.Additionally, as described above, the recording device 1 including thefunctions of the image processing device 10 can be understood.

In addition, according to the present embodiment, the pixel value beforeconversion and the pixel value after conversion performed by the pixelvalue converting unit 12 d are RGB values or CMYK values.

Additionally, according to the present embodiment, the “pixel valuebrighter than the intermediate color” refers to white or the color ofthe space. According to such a configuration, the occurrence of dots inpositions separate from the code elements that make up the code imagecan be easily suppressed.

4. Modified Example

Next, several modified examples included in the present embodiment willbe described. Various combinations of the embodiments and modificationexamples described heretofore are also included in the disclosureherein.

First Modified Example

The pixel value converting unit 12 d may average pixel values of pixelsthat are intermediate color pixels and are adjacent pixels.Specifically, the pixel value converting unit 12 d converts the pixelvalue of the pixels of interest, which are determined as “Yes” in stepS140, and determined as “No” in step S150 into an average pixel value ofpixels of interest that are determined as “Yes” in step S140 and aredetermined as “No” in step S150, at the timing before the HT processingof step S190. Though called as an intermediate color, it does not meanone color, the pixel values of the intermediate color pixels are varied.Therefore, the pixel value converting unit 12 d averages the pixelvalues of pixels that are intermediate color pixels and adjacent pixels,thereby stabilizing the density in the vicinity of the edges of the codeelements such as bars in the code image. As a result, the thickness ofthe code element after HT processing is stabilized, and the sloshing ofthe edge of the code element is further suppressed.

Second Modified Example

When a magnification of pixel number conversion performed by the pixelnumber converting unit 12 a is an integer value, the pixel valueconverting unit 12 d converts the pixel value of the adjacent pixel thatis the intermediate color pixel, and the pixel value of the separatedpixel that is an intermediate color pixel into the pixel value brighterthan the intermediate color, when the magnification of the pixel numberconversion performed by the pixel number converting unit 12 a is anon-integer value, the pixel value converting unit 12 d does not convertthe pixel value of the adjacent pixel that is an intermediate colorpixel into the pixel value brighter than the intermediate color, andconverts the pixel value of the separated pixel that is an intermediatecolor pixel into the pixel value brighter than the intermediate color.

FIG. 5 illustrates the image processing according to a second modifiedexample in which the control unit 11 executes according to the imageprocessing program 12 by a flowchart. The flowchart of FIG. 5 differsfrom the flowchart of FIG. 2 for the determination of step S145 isincluded. With respect to FIG. 5, the same content as FIG. 2 is omitted.

In step S145, the pixel value converting unit 12 d branches processingaccording to whether the magnification of the pixel number convertingexecuted by the pixel number converting unit 12 a is an integer value instep S110. If the magnification of the pixel number converting is aninteger value such as, for example, 1.0 times, 2.0 times, 3.0 times, thepixel value converting unit 12 d proceeds from the determination of“Yes” to step S160. On the other hand, if the magnification of the pixelnumber converting is non-integer value such as, for example, 1.5 times,2.5 times, the pixel value converting unit 12 d proceeds from thedetermination of “No” to step S150. While repeating the cycles of stepsS130 to S170 until “Yes” at step S170, the determination results of stepS145 do not change.

In other words, in the second modified example, when the magnificationof the pixel number converting in step S110 is an integer value, thepixel value converting unit 12 d sets the pixel value as the target ofthe pixel value conversion in step S160, regardless of whether it is theseparated pixel or an adjacent pixel, if it is an intermediate colorpixel in the code image. If the magnification of the pixel numberconversion is an integer value, in step S110, the number of the codeelement pixels, the number of the intermediate color pixels, and thenumber of the space pixels in the code image simply increase or do notchange. Thus, when the magnification of the pixel number converting isan integer value, even if all of the intermediate color pixels in thecode image are converted into a color equivalent to the space pixels,the thickness of the code element is not unnecessarily scraped, and thecode element is suppressed from sloshing, the pixel value convertingunit 12 d proceeds to step 160 from the determination of step S145.

On the other hand, when the magnification of the pixel number conversionis a non-integer value, an interpolation method is employed in which,for example, a plurality of peripheral pixels, such as a bilinearmethod, is referred to and the interpolation pixels are generated forthe pixel number converting in step S110. According to such aninterpolation method, a new intermediate color pixel brighter than thecolor of the code element is easily generated between the code elementpixel before interpolation and the intermediate color pixel. Then, theintermediate color pixel newly generated in this way can be said to bepart of the interpolation result of the code element pixel before theinterpolation, thus, if the pixel is converted into a color equivalentto the space pixel, there is a possibility that the thickness of thecode element may be reduced more than necessary. Thus, when themagnification of the pixel number conversion is a non-integral multiple,the pixel value converting unit 12 d proceeds from the determination instep S145 to step 150, and does not set the adjacent pixels in theintermediate color pixels performed in step S160 as the target of thepixel value conversion.

Other Description

Instead of executing step S160, the control unit 11 may executeprocessing corresponding to step S160 on the image data after the HTprocessing. That is, the control unit 11 may convert dot on to dot offon the pixels included in the image data after the HT processing to be atarget of the pixel value converting in a case where it is assumed thatthe pixel value converting in step S160 is performed.

As described above, k≥2. For example, it may be set as k=3. When k=3,the separated pixel may be defined as a pixel located at a positionwhere not less than 2 other pixels are interposed between the codeelements. Therefore, when k=3, the adjacent pixel is not only a pixeladjacent to the code element, but also a pixel at a position where apixel is interposed between the code elements.

What is claimed is:
 1. An image processing device comprising: a processor configured to execute a plurality of functions as a code detection unit configured to detect a code image included in an input image; a pixel value determination unit configured to determine whether a pixel value of each pixel included in the code image corresponds to an intermediate color between a color of code elements constituting the code image and a color of a space between the code elements; and a pixel value converting unit configured to determine whether an intermediate color pixel that has been determined as corresponding to the intermediate color is a separated pixel which is a pixel spaced apart and separated from the code elements by k pixels or more, k being an integer of 2 or greater, the pixel value converting unit being further configured to convert a pixel value of the separated pixel into a pixel value brighter than the intermediate color, upon determining that the intermediate color pixel is the separated pixel.
 2. The image processing device according to claim 1, wherein the pixel value brighter than the intermediate color is white or the color of the space.
 3. The image processing device according to claim 1, wherein the pixel value converting unit averages pixel values of adjacent pixels that are the intermediate color pixels and do not correspond to the separated pixel.
 4. The image processing device according to claim 1, wherein the pixel value before conversion and the pixel value after conversion performed by the pixel value converting unit are RGB values including respective gradations of red, green, and blue, or CMYK values including respective gradations of cyan, magenta, yellow, and black.
 5. An image processing device comprising: a processor configured to execute a plurality of functions as a code detection unit configured to detect a code image included in an input image; a pixel value determination unit configured to determine whether a pixel value of each pixel included in the code image corresponds to an intermediate color between a color of code elements constituting the code image and a color of a space between the code elements; a pixel value converting unit configured to convert a pixel value of a separated pixel that is a pixel separated from the code elements by k pixels or more, among intermediate color pixels that are pixels determined to correspond to the intermediate color, into a pixel value brighter than the intermediate color; and a pixel number converting unit configured to convert the pixel number of the input image, wherein k is an integer of 2 or greater, when a magnification of pixel number conversion performed by the pixel number converting unit is an integer value, the pixel value converting unit converts a pixel value of an adjacent pixel that is the intermediate color pixel and does not correspond to the separated pixel, and the pixel value of the separated pixel that is the intermediate color pixel, into a pixel value brighter than the intermediate color, and when the magnification of pixel number conversion performed by the pixel number converting unit is a non-integer value, the pixel value converting unit does not convert the pixel value of the adjacent pixel that is the intermediate color pixel into a pixel value brighter than the intermediate color, and converts the pixel value of the separated pixel that is the intermediate color pixel into a pixel value brighter than the intermediate color.
 6. An image processing method, comprising: detecting a code image included in an input image; determining whether a pixel value of each pixel included in the code image corresponds to an intermediate color between a color of code elements constituting the code image and a color of a space between the code elements; determining whether an intermediate color pixel that has been determined as corresponding to the intermediate color is a separated pixel which is a pixel spaced apart and separated from the code elements by k pixels or more, k being an integer of 2 or greater; and converting a pixel value of the separated pixel into a pixel value brighter than the intermediate color upon determining that the intermediate color pixel is the separated pixel.
 7. The image processing device according to claim 1, wherein upon determining that the intermediate color pixel is not the separated pixel, the pixel value converting unit is configured not to convert a pixel value of the intermediate color pixel, which is determined not to be the separated pixel, into the pixel value brighter than the intermediate color. 